<?php
    if(!isset($_POST['go'])){
?>
<form action="install.php" method="POST">
    Admin Name:
    <input type="text" name="adminName" value="Type Admin Name Here" />
    <br>
    Password:
    <input type="password" name="adminPassword" value="" />
    <br>
    <input type="submit" value="Create Admin/Install Database" name="go" />
</form>
<?php
    }
    else{
        include 'config.php';

        $link = mysql_connect($config['databaseURL'],
                            $config['databaseUser'],
                            $config['databasePassword']);
        $query="CREATE DATABASE IF NOT EXISTS users";
        mysql_query($query);
        $query="CREATE TABLE `users`.`update_users` (
            `website` TEXT NOT NULL,
            `password` TEXT NOT NULL,
            `storecode` TEXT NOT NULL
        )";
        mysql_query($query);
        $query="INSERT INTO`users`.`update_users`(
                    `website`,
                    `password`,
                    `storecode`
                )
                VALUES (
                    '{$_POST['adminName']}','{$_POST['adminPassword']}','0'
                );";
        mysql_query($query);
    }
?>
